<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">    
    <title>list_the_files</title>
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>  
  <body>
    <s:include value="/include/header.jsp"></s:include>
    <s:if test="%{#session.userId != null}">
    <table>
    	<tr>
		  	<td><s:text name="File Name" /></td>
		  	<td><s:text name="File Description" /></td>
	  	</tr>
    <s:iterator value ="fileList"  status="stat" >
  		<!-- download here -->
  		<tr>
  			<td><a href="<s:url includeParams="none" namespace="/" action="user/details_file" >
  					<s:param name="FId"><s:property value="FId" /></s:param></s:url>">
					<s:property value="FLabel" />
			</a></td>
  		<!-- add date later -->
  			<td><s:property value="FDescription" /></td>
  		</tr>
	</s:iterator>
	</table>
	<s:if test="%{#request['link']=='sc'}">
	<a href="<s:url includeParams="none" namespace="/" action="user/details_service_contract" >
  					<s:param name="scId"><s:property value="%{#request['no.']}" /></s:param></s:url>">
		<s:text name="Back to Owner" />
	</a>
	</s:if>
	<s:elseif test="%{#request['link']=='tr'}">
	<a href="<s:url includeParams="none" namespace="/" action="user/details_transaction" >
  					<s:param name="trId"><s:property value="%{#request['no.']}" /></s:param></s:url>">
		<s:text name="Back to Owner" />
	</a>
	</s:elseif>
	<s:else>
	<a href="<s:url includeParams="none" namespace="/" action="user/details_bid" >
  					<s:param name="bdId"><s:property value="%{#request['no.']}" /></s:param></s:url>">
		<s:text name="Back to Owner" />
	</a>
	</s:else>
    <br>
	</s:if>
  </body>
</html>
